home *** CD-ROM | disk | FTP | other *** search
/ Aminet 21 / Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso / Aminet / util / libs / DigNet.lha / dignet / resourcetracking / demos / RT_Demos.doc < prev   
Encoding:
Text File  |  1997-03-12  |  1.5 KB  |  55 lines

  1.  
  2. Resource tracking demo programs
  3. -------------------------------
  4.  
  5.  
  6. In this dir you will find two demo programs that shows the resource tracking
  7. capabillities of the dignet.library. We included the sources so you can see
  8. what they do wrong (note: the errors are intended to show what happends).
  9.  
  10.  
  11. DignetNoFree
  12. ------------
  13.  
  14. USAGE:
  15.  
  16. DignetNoFree <device> <unit>
  17.  
  18. This program allocates a dignet net structure, but it exits immediatly
  19. without freeing it.
  20.  
  21. Now: Try to open the device again with f.ex. DignetTERM.
  22. You can't since the device is in use.
  23.  
  24. So: use the DignetLIST program to show information about the nets in use.
  25.  
  26. Then: use the DignetKILL <no.> to remove the Dignet demo task.
  27.  
  28. You can now try to use the DignetTERM program again.
  29. you will get a successful open and the memory the demo program left is freed
  30. together with the device closing, port freeing etc.
  31.  
  32.  
  33.  
  34. DignetFreeTwice
  35. ---------------
  36.  
  37. USAGE:
  38.  
  39. DignetFreeTwice <device> <unit>
  40.  
  41. This program shows what happens if you try to free a net sturcture twice (or
  42. muliple of times for that matter). It checks the result of FreeNet() and if
  43. it is not null you have tried to free it after it became invalid which the
  44. program stated.
  45.  
  46.  
  47. Other tests
  48. -----------
  49.  
  50. Use the DignetNoFree again. Then flush the libraries in the system. You will
  51. get a requester that warns you about the programs using the dignet. Before
  52. you press OK you can use the DignetLIST and DignetKILL to remove the
  53. leftover structures. Press OK and everything is ok.
  54.  
  55.